<?php  echo $_SERVER['SCRIPT_NAME']."<BR>"; ?>
<?php
	$age = 21;
	$price = 57.52;
	$isReady = FALSE;
	$name = "Brad Miller";
	$fname = "Brenda";
	$lname = "Miller"; 
	
	$price = 10.00 + 7.50;
	
	
		$day = "Tuesday";
		$var = "day";
		$$var = "Friday"; // the same as $day = "Friday"; transforms the value of $var in the variable $day = "Friday"
		print $$var;
		print $day;
	
	
	// unset($age); unset the value of variable $age
	
	
	
	/*	
		$a = 1000; $b = 0;
		$c = @($a/$b);
		echo @($a/$b);
		echo @($a/$b); // << will cause an error.
		
		$test = acos(1.01);
		echo "!!NaN: ".$test."!!<br>";
		echo "!!Is this a NaN (1 == true): ".is_nan($test)."!!<br>";
		
		// is_finite() is_infinite()
		*/
	
	
	
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../include/main.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td><div align="right" class="txt24bb_white">Declaring and Assigning Variables </div></td>
  </tr>
</table>
<br>

<table width="500" border="0" align="center" cellpadding="1" cellspacing="1" class="tbl_border">
  <tr>
    <td><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tbl_gray_wborder">
        <tr>
          <td class="txt14b_black">            <p align="left"><span class="txt14b_red">&lt;?php</span></p>&nbsp;&nbsp;&nbsp;$age = <span class="txt14b_red">21</span>;<br>&nbsp;&nbsp;&nbsp;$price = <span class="txt14b_red">17.52</span>;<br>&nbsp;&nbsp;&nbsp;$isReady = <span class="txt14_green">TRUE</span>;<br>&nbsp;&nbsp;&nbsp;$name = <span class="txt14b_red">&quot;Brad Miller&quot;</span>;<br>&nbsp;&nbsp;&nbsp;$fname = <span class="txt14b_red">&quot;Brenda&quot;</span>;<br>&nbsp;&nbsp;&nbsp;$lname = <span class="txt14b_red">&quot;Miller&quot;</span>; <br>            <br>&nbsp;&nbsp;&nbsp;$name = $fname + <span class="txt14b_red">&quot; &quot;</span> + $lname;
            <p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$day = <span class="txt14b_red">&quot;Tuesday&quot;</span>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$var = <span class="txt14b_red">&quot;day&quot;</span>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$$var = <span class="txt14b_red">&quot;Friday&quot;</span>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print $$var;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print $day;<br>
<br>
&nbsp;&nbsp;&nbsp;<span class="txt16b_blue">unset</span>($age);<br>
<br>
<span class="txt14b_red">?&gt;</span></p></td>
        </tr>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="1" class="tbl_border">
  <tr>
    <td><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tbl_gray_wborder">
        <tr>
          <td class="txt14b_black">              <span class="txt14b_red">What is the value of $name?</span>          &nbsp;&nbsp;&nbsp;$name = <?php echo($lname)?><br>
            <span class="txt14b_red">How much does the softw</span>            <span class="txt14b_red">are cost?&nbsp;</span>&nbsp;&nbsp;$price = <?php echo($price)?><br>
            <span class="txt14b_red">How old are you?</span>&nbsp;&nbsp;&nbsp;$age = <?php echo($age)?> <br>
          <span class="txt14b_red">Is the value of $age set?</span> isset($age) = <?php print(isset($age))?><br>
          <span class="txt14b_red">What is the value of $isReady?</span> $isReady = <?php echo($isReady)?></td>
        </tr>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
